import React from 'react';
import { connect } from 'react-redux';
import { RecommendWrapper, RecommendItem } from '../style';
class Recommend extends React.Component {
  render() {
    const { recommendList } = this.props;
    return (
      <RecommendWrapper>
        {recommendList.map((item, index) => {
          return <RecommendItem key={index} imgURL={item.get('url')}></RecommendItem>;
        })}
      </RecommendWrapper>
    );
  }
}

const mapStateToProps = (state) => {
  return {
    recommendList: state.get('home').get('recommendList'),
  };
};
export default connect(mapStateToProps, null)(Recommend);
